home *** CD-ROM | disk | FTP | other *** search
- Path: fido.asd.sgi.com!news
- From: austern@isolde.mti.sgi.com (Matt Austern)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Followup-To: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Date: 10 Apr 1996 17:34:41 GMT
- Organization: SGI
- Message-ID: <AUSTERN.96Apr10103441@isolde.mti.sgi.com>
- References: <JSA.96Feb16135027@organon.com> <dewar.828936837@schonberg>
- <4kb2j8$an0@solutions.solon.com> <4kbrt5$k3h@mulga.cs.mu.OZ.AU>
- <4kcer3$mi4@solutions.solon.com> <4kdnvq$3n8@mulga.cs.mu.OZ.AU>
- <4kgmgu$jm@galaxy.ucr.edu>
- Reply-To: austern@mti.sgi.com
- NNTP-Posting-Host: isolde.mti.sgi.com
- In-reply-to: thp@cs.ucr.edu's message of 10 Apr 1996 16:10:06 GMT
-
- In article <4kgmgu$jm@galaxy.ucr.edu> thp@cs.ucr.edu (Tom Payne) writes:
-
- > The problem shows up in real situations: In C++ AFAIK there is no
- > efficient way for an exception at the hardware level to generate an
- > exception (in the C++ sense) on the part of the running program -- the
- > running must poll a volatile atomic variable to see if the exception
- > has occurred. This obviously makes the langauge, as defined in the
- > standard, unacceptable for use in the area of, say, embedded systems.
- > Even in scientific progrmming, however, one would like to be able to
- > throw an exception out of a matrix manipulation routine when the
- > underlying hardware detects a floating point exception, and polling
- > for such an occurrence would involve unacceptable overhead.
-
- Are you sure that this is possible on the machines that you'd like
- your program to run on? On many of today's RISC chips, after all,
- floating point exceptions are asynchronous: you have no way of
- knowing which instruction caused the problem.
-
- (This sounds perverse, but there's a reason for it. If you want
- synchronous exceptions, you end up having to stall the pipeline when
- you're processing a floating point instruction.)
- --
- Matt Austern
- SGI: MTI Compilers Group
- austern@isolde.mti.sgi.com
-